package StudentCourse;

public class Teacher extends Person {  // 让 Teacher 也继承 Person
    private String courseTaught;

    public Teacher(String teacher_id, String name_teacher, String sex_teacher, String courseTaught) {

        super(teacher_id, name_teacher, sex_teacher, courseTaught);

        this.courseTaught = courseTaught;
    }


    public String getCourseTaught() {

        return courseTaught;

    }


    public void setCourseTaught(String courseTaught) {

        this.courseTaught = courseTaught;

    }


    public void printSchedule() {

        super.printSchedule();
        System.out.println("老师 " + getName() + " 在 " + Courses.address + " 上 " + Courses.time + " 的 " + Courses.name + " 课");

    }
}

